package com.zmm.book.keep;

import com.zmm.util.auth.model.Operator;
import com.zmm.util.auth.registry.annotation.EnableAuthentication;
import com.zmm.util.config.BaseConfigure;
import com.zmm.util.document.AnnotationUtil;
import com.zmm.util.document.register.EnableIdo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;

/**
 * @Description:
 * @Name BookKeepApplication
 * @Author Zebulon
 * @Date By 2021-09-27 17:34:34
 */
@EnableIdo
@EnableScheduling
@EnableDiscoveryClient
@EnableAuthentication
@MapperScan("com.zmm.book.keep.dao")
@SpringBootApplication
public class BookKeepApplication {

	public static void main(String[] args) {
		/**
		 * https://blog.csdn.net/qq_37171353/article/details/105461870
		 * 我当时是把Sentinel启动在阿里云服务器上，然后我电脑在启动SpringBoot微服务A
		 * （需要Sentinel监控）时候微服务A给Sentinel发送的地址默认是内网地址（192.xxx）
		 * 而不是外网地址，所以当Sentinel给192.xx发送心跳就发送不到，就监控不到服务和请求
		 * 
		 */
		
		/**
		 * String ip = IpUtil.getOutIPV4()
		 * System.setProperty(TransportConfig.HEARTBEAT_CLIENT_IP, ip)
		 * 此方法还是不行 自测是 还是本地启动 sentinel-dashboard-1.8.0.jar
		 * 
		 * zipkin
		 * https://gitee.com/apgblogs/springCloudStudy/tree/zipkin/
		 */
		SpringApplication.run(BookKeepApplication.class, args);
	}


	@Component
	public class ServiceConfigure extends BaseConfigure {
	}
	
	
	@Component
	public class OperatorConfigure extends Operator {
	}
	
	@Component
	public class Annotation extends AnnotationUtil {
		
	}
}
